<?php
/**
 * Created by PhpStorm.
 * User: ljg
 * Date: 2020/7/2
 * Time: 19:37
 */
/**
 * @param $type
 * @return string
 * @context 奖品类型
 */
function getsPrizeCategory($type)
{
    switch ($type){
        case 1:
            return "积分";
            break;
        case 2:
            return "金币";
            break;
        case 3:
            return "卡券";
            break;
        case 4:
            return "修复材料";
            break;
        case 5:
            return "其他奖品";
            break;
        default:
            return "";
    }
}

/**
 * @param $type
 * @return string
 * @context 获取任务类型
 */
function getsTaskType($type)
{
    switch ($type){
        case 1:
            return "推荐玩家";
            break;
        case 2:
            return "达成级别";
            break;
        case 3:
            return "转轮摇奖";
            break;
        case 4:
            return "金币转账";
            break;
        case 5:
            return "团队人数";
            break;
        case 6:
            return "发红包";
            break;
        case 7:
            return "连续签到";
            break;
        case 8:
            return "生意出售";
            break;
        case 9:
            return "生意购买";
            break;
        case 10:
            return "兑换材料";
            break;
        case 11:
            return "积分转账";
            break;
        case 12:
            return "生意交租";
            break;
        case 13:
            return "激活账号";
            break;
        case 14:
            return "首次注册";
            break;
        case 15:
            return "打劫玩家";
            break;
        case 16:
            return "反击玩家";
            break;
        case 17:
            return "每日答题";
            break;
        case 18:
            return "卡券使用";
            break;
        default:
            return "";
    }
}

/**
 * @param $str
 * @return mixed
 * @context 去除富文本中图片地址的upload
 */
function wipeOffFormStr($str)
{
    return str_replace('/upload/','',$str);
}

/**
 * @param $stemp
 * @return false|string
 * @context 时间戳转为日期时间
 */
function getsTimeFormat($stemp)
{
    return date("Y-m-d H:i:s",$stemp);
}
